/*
 * Copyright 2009 Prime Technology.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package br.jm.financeiro.entity;

import java.io.Serializable;

public class Document implements Serializable {

    private String nivel1;
    private String nivel2;
    private String nivel3;

    public Document(String name, String size, String type) {
        this.nivel1 = name;
        this.nivel2 = size;
        this.nivel3 = type;
    }

    public Document() {
    }

    public String getNivel1() {
        return nivel1;
    }

    public void setNivel1(String nivel1) {
        this.nivel1 = nivel1;
    }

    public String getNivel2() {
        return nivel2;
    }

    public void setNivel2(String nivel2) {
        this.nivel2 = nivel2;
    }

    public String getNivel3() {
        return nivel3;
    }

    public void setNivel3(String nivel3) {
        this.nivel3 = nivel3;
    }

    //Eclipse Generated hashCode and equals
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((nivel1 == null) ? 0 : nivel1.hashCode());
        result = prime * result + ((nivel2 == null) ? 0 : nivel2.hashCode());
        result = prime * result + ((nivel3 == null) ? 0 : nivel3.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        Document other = (Document) obj;
        if (nivel1 == null) {
            if (other.nivel1 != null) {
                return false;
            }
        } else if (!nivel1.equals(other.nivel1)) {
            return false;
        }
        if (nivel2 == null) {
            if (other.nivel2 != null) {
                return false;
            }
        } else if (!nivel2.equals(other.nivel2)) {
            return false;
        }
        if (nivel3 == null) {
            if (other.nivel3 != null) {
                return false;
            }
        } else if (!nivel3.equals(other.nivel3)) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return nivel1;
    }
}